<template>
	<view>
		<u-popup v-model="telShow" mode="bottom" border-radius="14" length="23%">
				<view class="tel-style">
					 {{userInfo.phone}}
				</view>
				<view class="tel-style" style="margin-top: 20rpx;" @click="telShowFale">
					 取消
				</view>
			</u-popup>
	</view>
</template>

<script >
	export default {
		
		
		data() {
			return {
				telShow:false,
				userInfo:uni.getStorageSync('userNameInfo')
			}
		},
		created() {
					uni.$on('telShow',telShow=>{
						// this.telShow = telShow;
						// console.log("telShow",this.telShow);
						uni.showActionSheet({
							itemList:[this.userInfo.phone],
							success:({tapIndex})=> {
								if(tapIndex===0){
									uni.makePhoneCall({
										phoneNumber:this.userInfo.phone
									})
								}
							}
						})
					})
				},
		methods: {
			telShowFale(){
				uni.$emit("telShow",false)
			}
		}
	}
</script>

<style scoped lang="scss">
.tel-style{
	width: 95%;
	text-align: center;
	height: 120rpx;
	line-height: 120rpx;
	color: #007aff;
	background-color: #ffffff;
	margin: 0 auto;
	border-radius: 18rpx;
	font-size: 34rpx;
}
/deep/.u-drawer-content-visible{
		background-color: transparent !important;
	}

</style>
